package com.happy.people.cofig.mapper.internal;

import org.beetl.sql.core.SQLManager;
import org.beetl.sql.core.SQLScript;
import org.beetl.sql.core.SQLSource;
import org.beetl.sql.core.annotatoin.TableTemplate;
import org.beetl.sql.core.db.TableDesc;
import org.beetl.sql.core.kit.BeanKit;
import org.beetl.sql.core.mapper.MapperInvoke;

import java.lang.reflect.Method;
import java.util.Set;

/**
 * @Author : Yan
 * @Description : 分页查询
 */
public class SelectPageQueryAmi implements MapperInvoke {
    @Override
    public Object call(SQLManager sm, Class cls, String sqlId, Method m, Object[] args) {
        String tableName = sm.getDbStyle().getNameConversion().getTableName(cls);
        System.out.print(tableName);



        SQLSource sqlSource = sm.getDbStyle().genSelectByTemplate(cls);
        SQLScript sqlScript = new SQLScript(sqlSource,sm);
        // 获取sql执行语句
        SQLScript pageSqlScript = sm.getPageSqlScript(sqlId);
        // 查询数据
        //return pageSqlScript.select(paras, clazz, mapper, start, size);
        return null;
    }
}
